﻿@using System.Globalization
@model IEnumerable<WebApplication.Models.DataSet>

@{
    ViewBag.Title = "DataSets";
}

<h2>DataSets</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayName("Id")
        </th>
        <th>
            @Html.DisplayName("Time")
        </th>
        <th>
            @Html.DisplayName("Name")
        </th>
        <th>
            @Html.DisplayName("Note")
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayName(item.id.ToString())
        </td>
        <td>
            @Html.DisplayName(item.dateTime.ToString(CultureInfo.CurrentCulture))
        </td>
        <td>
            @Html.DisplayName(item.name)
        </td>
        <td>
            @Html.DisplayName(item.note)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new {id = item.id}) |
            @Html.ActionLink("Delete", "Delete", new {id = item.id})
        </td>
    </tr>
}

</table>
